<?php 
require_once 'kelas/record.php';

require_once 'kelas/kategori.php';
require_once 'kelas/produk.php';
require_once 'kelas/siteoptions.php';
$dtWw = $objSiteOptions->getWhoWe();
//($fields = '*', $cond = array(), $limit = null, $start = null, 
  //      $orderBy = null, $orderType = 'ASC', $condStr = null, $arrSearch = array()) 
$objProduk->namaTabel  ='v_produk';
$objProduk->get('id,gambar,harga_jual,nama,keterangan',array('aktif'=>1),4,0,'jumlah','DESC','(`jumlah`>0)');
$exDisp = $objProduk->execute();
$pDisp = isset($exDisp['result'])?$exDisp['result']:array();
$objProduk->get('id,gambar,harga_jual,nama,keterangan',array('aktif'=>1),4,0,'waktu','DESC','(`jumlah`>0)');
$exNcP = $objProduk->execute();
$ncP = isset($exNcP['result'])?$exNcP['result']:array();
//echo $objProduk->strQuery;
 ?>
<link rel="stylesheet" type="text/css" href="<?php echo BASEURL; ?>css/isi.css" />

<div id="frame_slide">
	<div class="slide"><?php  include "slide.php" ?></div>
  	<div class="frame_image">
<?php foreach ($pDisp as $dPr): ?>
    <a title="<?php echo $dPr['nama'].':'.$dPr['keterangan'] ?>" style="float:left;margin-bottom:10px" 
        href="<?php echo BASEURL.'?v=detail&id='.$dPr['id'] ?>">
        <div class="list_image">
            <img src="<?php echo BASEURL.'produk/'.$dPr['gambar'] ?>" 
            align="middle" width="130" height="120" />
        </div>
    </a>
<?php endforeach ?>
    
        
    	<!--div class="frame_list_image_1">
        	<a style="float:left" href=""><div class="list_image"><img src="image/list_image1.png" align="middle" width="130" height="120" /></div></a>
            <a style="float:left" href=""><div class="list_image"><img src="image/list_image2.png" align="middle" width="130" height="120" /></div></a>
        </div>
        <div class="frame_list_image_2">
        	<a href=""><div class="list_image"><img src="image/list_image3.png" align="middle" width="130" height="120" /></div></a>
            <a href=""><div class="list_image"><img src="image/list_image4.png" align="middle" width="130" height="120" /></div></a>
        </div-->
  	</div>
</div>

<div id="frame_center">
	<div class="our_product">
        <img src="<?php echo BASEURL.'image/shop_tachiba.png' ?>">
        <!--img src="<?php echo BASEURL.'image/logo_tachiba_furniture4.png' ?>" style="width:100%;height:100%;"-->
    </div>
    <div class="about_tachiba">
    	<span class="font_judul" id="who-we">WHO WE ARE ?</span><br />
            
        <span class="font_isi_judul">
        <p><span class="font_line" >  -------------------------------------------------------------------</span></p>
            
        <?php echo $dtWw['who_we']; ?>
         <?php if(strlen(trim($dtWw['benefit']))>0): ?>       
         <p><span id="given-benefit" class="font_sub_judul">Benefit Yang Kami Berikan</span></p>
         	<?php echo $dtWw['benefit'];
            endif; ?>

         </span>
    </div>
</div>

<div id="frame_new_collection" class="font_judul">NEW COLLECTION <br />
	<span class="font_line">----------------------------------------------------------------------------------------------------------------</span>
</div>
<div id="produk_beranda">
    <?php foreach ($ncP as $newColPr): ?>
        <div class="frame_produk_beranda_2">
        <table width="180" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2" valign="middle">
                    <a href="<?php echo BASEURL.'?v=detail&id='.$newColPr['id'] ?>">
                        <img width="130" height="120" src="<?php echo BASEURL; ?>produk/<?php echo $newColPr['gambar']; ?>" width="180" />
</a>
                    </td>

            </tr>
            <tr>
                <td colspan="2" class="font_sub_judul"><?php echo $newColPr['nama']; ?></td>
            </tr>
            <tr>
                <td colspan="2" valign="top" class="font_isi_judul"><?php echo $objFungsi->readMore($newColPr['keterangan'],50); ?></td>
            </tr>
            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td width="108" class="font_isi_judul"><?php echo $objFungsi->formatUang($newColPr['harga_jual']); ?></td>
                <td width="80" align="right"><a href="<?php echo BASEURL.'proses/belanja.php?on=addCart&id='.$newColPr['id']; ?>"><div class="button">add to cart</div></a></td>
          </tr>
        </table>
    </div>
    <?php endforeach ?>
	<!--div class="frame_produk_beranda_1">
    	<table width="180" cellpadding="3" cellspacing="0" border="0">
        	<tr>
            	<td colspan="2" valign="middle"><img src="produk/produk1.png" width="180" /></td>
            </tr>
            <tr>
            	<td colspan="2" class="font_sub_judul">Lemari Kayu</td>
            </tr>
            <tr>
            	<td colspan="2" valign="top" class="font_isi_judul">meja meja meja meja meja meja meja meja meja meja </td>
            </tr>
            <tr>
            	<td colspan="2">&nbsp;</td>
            </tr>
			<tr>
            	<td width="108" class="font_isi_judul">IDR : 1500</td>
        		<td width="80" align="right"><a href=""><div class="button">add to cart</div></a></td>
          </tr>
        </table>
    </div>
    <div class="frame_produk_beranda_1">
    	<table width="180" cellpadding="3" cellspacing="0" border="0">
        	<tr>
            	<td colspan="2" valign="middle"><img src="produk/produk2.png" width="180" /></td>
            </tr>
            <tr>
            	<td colspan="2" class="font_sub_judul">Sofa Kulit Asli</td>
            </tr>
            <tr>
            	<td colspan="2" valign="top" class="font_isi_judul">apa apa apa apa apa apa apa apa apa apa apa apa apa apa apa </td>
            </tr>
            <tr>
            	<td colspan="2">&nbsp;</td>
            </tr>
            <tr>
            	<td width="108" class="font_isi_judul">IDR : 4500</td>
              	<td width="80" align="right"><a href=""><div class="button">add to cart</div></a></td>
            </tr>
        </table>
    </div>
    <div class="frame_produk_beranda_1">
    	<table width="180" cellpadding="3" cellspacing="0" border="0">
        	<tr>
            	<td colspan="2" valign="middle"><img src="produk/produk3.png" width="180" /></td>
            </tr>
            <tr>
            	<td colspan="2" class="font_sub_judul">Kursi Teras</td>
            </tr>
            <tr>
            	<td colspan="2" valign="top" class="font_isi_judul">kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi</td>
            </tr>
            <tr>
            	<td colspan="2">&nbsp;</td>
            </tr>
            <tr>
            	<td width="108" class="font_isi_judul">IDR : 2000</td>
              	<td width="80" align="right"><a href=""><div class="button">add to cart</div></a></td>
            </tr>
        </table>
    </div>
    <div class="frame_produk_beranda_2">
    	<table width="180" cellpadding="3" cellspacing="0" border="0">
        	<tr>
            	<td colspan="2" valign="middle"><img src="produk/produk4.png" width="180" /></td>
            </tr>
            <tr>
            	<td colspan="2" class="font_sub_judul">Kursi Kantor</td>
            </tr>
            <tr>
            	<td colspan="2" valign="top" class="font_isi_judul">kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi kursi</td>
            </tr>
            <tr>
            	<td colspan="2">&nbsp;</td>
            </tr>
            <tr>
            	<td width="108" class="font_isi_judul">IDR : 2700</td>
              	<td width="80" align="right"><a href=""><div class="button">add to cart</div></a></td>
            </tr>
        </table>
    </div-->
</div>

<!--div id="frame_new_produk" class="font_line">
	----------------------------------------------------------------------------------------------------------------
</div>

<div id="gallery_beranda" align="center">
	<div class="frame_gallery_beranda">
    	<div class="judul_gallery_beranda">KITCHEN</div>
        <div class="image_gallery_beranda"><img src="image/no image.png" /></div>
    </div>
    <div class="frame_gallery_beranda">
    	<div class="judul_gallery_beranda">BAD ROOM</div>
        <div class="image_gallery_beranda"><img src="image/no image.png" /></div>
    </div>
    <div class="frame_gallery_beranda">
    	<div class="judul_gallery_beranda">LIVING ROOM</div>
        <div class="image_gallery_beranda"><img src="image/no image.png" /></div>
    </div>
    <div class="frame_gallery_beranda">
    	<div class="judul_gallery_beranda">UNILAND</div>
        <div class="image_gallery_beranda"><img src="image/no image.png" /></div>
    </div>
    <div class="frame_gallery_beranda_2">
    	<div class="judul_gallery_beranda_2">KURSI</div>
        <div class="image_gallery_beranda_2"><img src="image/no image.png" /></div>
    </div>
</div-->
